package com.shangyueshang.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shangyueshang.model.Goods;
import com.shangyueshang.request.GoodsDTO;
import com.shangyueshang.request.PageReq;
import com.shangyueshang.response.HttpResult;
import com.shangyueshang.response.PageResult;
import com.shangyueshang.response.ShopSkuDTO;

import java.util.Map;

/**
 * @author: JokeyZheng
 * @email: zhengjingfeng@ruqimobility.com
 * @created: 2022/1/14 15:15
 * @version: v1.0.0
 */
public interface GoodsService extends IService<Goods> {

    /**
     * 保存产品信息
     *
     * @param goodsDTO
     * @return
     */
    HttpResult<Void> save(GoodsDTO goodsDTO);

    /**
     * 分页查询
     *
     * @param pageReq
     * @return
     */
    PageResult<Goods> findPage(PageReq pageReq);

    /**
     * 根据店铺查询SKU关联的产品信息
     *
     * @param shop
     * @return
     */
    Map<String, ShopSkuDTO> queryByShop(String shop);

}
